<!DOCTYPE html>
<html lang="en" layout:decorator="common/contentLayout"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">

<!--页面内容 继承自common/layout.html-->
<div layout:fragment="content">
    <form class="layui-form" id="queryForm">
        <div class="layui-form-item layui-inline">

            <div class="layui-inline">
                <select id="ip" name="ip" lay-filter="topicSelect" lay-search>
                    <option value="">请选择db物理机</option>
                    <option th:each="ip:${ipList}" th:value="${ip}" th:text="${ip}"></option>
                </select>
            </div>
            <a class="layui-btn" id="physicalMachineSearchList_btn" lay-filter="physicalMachineSearchList_btn"><i class="layui-icon">&#xe615;</i>查询</a>
        </div>
    </form>
    <table id="physicalMachineReportTable"
           class="layui-table"
           lay-data="{height:'full',url:'/dbNode/physicalMachineReport/data',id:'physicalMachineReportTable',totalRow: true,toolbar:'#toolbarDemo'}"
           lay-filter="physicalMachineReportTable">
        <thead>
        <tr>
            <th lay-data="{field: 'ip', align: 'center', sort: true,templet:'#idTpl',totalRowText: '合计'}">物理机Ip</th>
            <th lay-data="{field: 'msgCount', align: 'center',totalRow: true, sort: true}">消息总量</th>
            <th lay-data="{field: 'avgCount', align: 'center',totalRow: true, sort: true}">平均数/天</th>
        </tr>
        </thead>
    </table>
</div>

<div layout:fragment="end-load-files">

    <script>
        layui.use(['element', 'table', 'jquery', 'layer', 'form'], function () {
            var table = layui.table,
                form = layui.form,
                layer = layui.layer,
                $ = layui.$,
                element = layui.element;

            $("body").on("click", "#physicalMachineSearchList_btn", function () {
                table.reload('physicalMachineReportTable');
            });
        });

    </script>

</div>
</html>
